

const con = require('../utils/myconn.js')

exports.login = function (data, callback) {

    var sql = `select * from users where email = "${data}"`;
    con.query(sql, (err, reslut) => {
        if (err) {
            callback(err)
        } else {
            callback(null, reslut[0])
        }
    })
}


